<?php

class PageController extends BaseController {

    public function showPage($slug, $id){

        $page = Page::active()
                ->where('slug', $slug)
                ->find($id);
                    
        if( is_null($page) ) {
            App::abort(404);
        }
        $images = $page->imagesOrdered;

        return View::make('page', compact('page', 'images'));
        
    }    
}
